package com.woniu.project.client;

import com.woniu.project.core.dto.ResultDto;
import com.woniu.project.params.productbigtype.ProductBigTypeAddParam;
import com.woniu.project.params.productbigtype.ProductBigTypeSelectParam;
import com.woniu.project.params.productbigtype.ProductBigTypeUpdateParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

@FeignClient(name = "product-server")
public interface ProductBigTypeClient {

    //根据是否有id和name进行不同的分页查询
    @GetMapping("/pawn/product/productBigType/select")
    public ResultDto select(@RequestBody ProductBigTypeSelectParam productBigTypeSelectParam) ;

    //根据商品大类id查询鉴定图定义
    @GetMapping("/pawn/product/productBigType/selectidentificationMap/{id}")
    public ResultDto select(@PathVariable Integer id) ;

    //新增商品大类
    @PostMapping("/pawn/product/productBigType/addBigType")
    public ResultDto addBigType(@Valid @RequestBody ProductBigTypeAddParam productBigTypeAddParam) ;

    //修改商品大类
    @PutMapping("/pawn/product/productBigType/updateBigType")
    public ResultDto updateBigType(@Valid @RequestBody ProductBigTypeUpdateParam productBigTypeUpdateParam);

    //根据id删除大类
    @DeleteMapping("/pawn/product/productBigType/deleteById/{id}")
    public ResultDto deleteById(@PathVariable Integer id) ;

}
